# 1、如何提取单个页面的数据
# 2、上线程池，多个页面同时抓取
import json

import requests


def download_on_page(url):
    params = {
        'current': 1,
        'limit': 20,
    }
    resp = requests.post(url, params=params)
    resp.encoding = 'UTF-8'
    # print(resp.text, type(resp.text))
    content = resp.text
    print(content)
    print(json.loads(content))


if __name__ == '__main__':
    download_on_page('http://www.xinfadi.com.cn/getPriceData.html')
